from django.db import models

from .base_model import BaseModel
from django.utils import timezone

class ClassEvaluation(BaseModel):
    created_at = models.DateTimeField(default=timezone.now, verbose_name="创建时间")
    EVALUATION_CHOICES = [
        ('good', '好'),
        ('medium', '中'),
        ('poor', '差'),
    ]
    
    evaluation = models.CharField(max_length=10, choices=EVALUATION_CHOICES, default='medium', verbose_name='评价等级')
    remark = models.TextField(blank=True, verbose_name='教师备注')

    class Meta:
        verbose_name = '课程评价'
        verbose_name_plural = '课程评价'

    def __str__(self):
        return f"课程评价 - {self.get_evaluation_display()}"